<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
   
   <meta name="description" content="string operations">
    
    <meta name="author" content="John S. Urban" >
    <link rel="icon" href="../favicon.png">

    <title>join &ndash; M_strings</title>

    <link href="../css/bootstrap.min.css" rel="stylesheet">
    <link href="../css/pygments.css" rel="stylesheet">
    <link href="../css/font-awesome.min.css" rel="stylesheet">
    <link href="../css/local.css" rel="stylesheet">
    
    <link  href="../tipuesearch/tipuesearch.css" rel="stylesheet">
    
    

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    
    <script src="../js/jquery-2.1.3.min.js"></script>
    <script src="../js/svg-pan-zoom.min.js"></script>

  </head>

  <body>

    <!-- Fixed navbar -->
    <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="../index.html">M_strings </a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
          <ul class="nav navbar-nav">
        
            <li class="dropdown hidden-xs visible-sm visible-md hidden-lg">
              <a href="#" class="dropdown-toggle"
              data-toggle="dropdown" role="button"
              aria-haspopup="true"
     aria-expanded="false">Contents <span class="caret"></span></a>
        <ul class="dropdown-menu">
          
              
            <li><a href="../lists/files.html">Source Files</a></li>
        
        
        
            <li><a href="../lists/modules.html">Modules</a></li>
        
            
                                
            <li><a href="../lists/procedures.html">Procedures</a></li>
        
               
            <li><a href="../lists/types.html">Derived Types</a></li>
        
        
            </ul>
            </li>


<li class="visible-xs hidden-sm visible-lg"><a href="../lists/files.html">Source Files</a></li>



<li class="visible-xs hidden-sm visible-lg"><a href="../lists/modules.html">Modules</a></li>



<li class="visible-xs hidden-sm visible-lg"><a href="../lists/procedures.html">Procedures</a></li>

                             
<li class="visible-xs hidden-sm visible-lg"><a href="../lists/types.html">Derived Types</a></li>


          </ul>
        
        <form action="../search.html" class="navbar-form navbar-right" role="search">
        <div class="form-group">
          <input type="text" class="form-control" placeholder="Search" name="q" id="tipue_search_input" autocomplete="off" required>
        </div>
<!--
        <button type="submit" class="btn btn-default">Submit</button>
-->
        </form>
        
        </div><!--/.nav-collapse -->
      </div>
    </nav>

    <div class="container">
    
  
  <div class="row">
    <h1>join
      <small>Function</small>
    
    </h1>
    
<div class="row">
  <div class="col-lg-12">
<div class="well well-sm">
  <ul class="list-inline" style="margin-bottom:0px;display:inline">
     
     
     
     
    
    
     <li><i class="fa fa-list-ol"></i>
       <a data-toggle="tooltip"
    data-placement="bottom" data-html="true"
    title=" 1.9% of total for procedures.">48 statements</a>
     </li> 
     
     
     
    <li><i class="fa fa-code"></i><a href="../src/M_strings.f90"> Source File</a></li>
     
     
  </ul>
  <ol class="breadcrumb in-well text-right">
  
    
     <li><a href='../sourcefile/m_strings.f90.html'>M_strings.f90</a></li>
    
     <li><a href='../module/m_strings.html'>M_strings</a></li>
    
  
     <li class="active">join</li>
  </ol>
</div>
</div>
</div>
<script>
  $(function () {
  $('[data-toggle="tooltip"]').tooltip()
  })
</script>

  </div>
  
  <div class="row">
    <div class="col-md-3 hidden-xs hidden-sm visible-md visible-lg">
    
<div id="sidebar">
  
<h3>Contents</h3>
 



<div class="panel panel-primary">
  <div class="panel-heading text-left"><h3 class="panel-title"><a data-toggle="collapse" href="#vars-0">Variables</a></h3></div>
  <div id="vars-0" class="panel-collapse collapse">
    <div class="list-group">
      
      <a class="list-group-item" href="../proc/join.html#variable-i~11">i</a>
      
      <a class="list-group-item" href="../proc/join.html#variable-left_local">left_local</a>
      
      <a class="list-group-item" href="../proc/join.html#variable-right_local">right_local</a>
      
      <a class="list-group-item" href="../proc/join.html#variable-sep_local">sep_local</a>
      
      <a class="list-group-item" href="../proc/join.html#variable-trm_local">trm_local</a>
      
    </div>
  </div>
</div>




















<div class="panel panel-primary">
  <div class="panel-heading text-left"><h3 class="panel-title">Source Code</h3></div>
  <div class="list-group">
    <a class="list-group-item" href="../proc/join.html#src">join</a>
  </div>
</div>



</div>

    </div>
    
    <div class="col-md-9" id='text'>
    <h2>
public pure function join(str, sep, trm, left, right, start, end) result(string)
    
    
   
</h2>
    
  


    
    <h2 id="name">NAME</h2>
<div class="codehilite"><pre><span></span><code><span class="n">join</span><span class="p">(</span><span class="mi">3</span><span class="n">f</span><span class="p">)</span> <span class="o">-</span> <span class="p">[</span><span class="n">M_strings</span><span class="p">:</span><span class="n">EDITING</span><span class="p">]</span> <span class="n">append</span> <span class="n">CHARACTER</span> <span class="n">variable</span> <span class="n">array</span> <span class="n">into</span>
<span class="n">a</span> <span class="n">single</span> <span class="n">CHARACTER</span> <span class="n">variable</span> <span class="n">with</span> <span class="n">specified</span> <span class="n">separator</span>
<span class="p">(</span><span class="n">LICENSE</span><span class="p">:</span><span class="n">PD</span><span class="p">)</span>
</code></pre></div>

<h2 id="synopsis">SYNOPSIS</h2>
<div class="codehilite"><pre><span></span><code><span class="nv">pure</span> <span class="nv">function</span> <span class="nv">join</span><span class="ss">(</span><span class="nv">str</span>,<span class="nv">sep</span>,<span class="nv">trm</span>,<span class="nv">left</span>,<span class="nv">right</span>,<span class="nv">start</span>,<span class="k">end</span><span class="ss">)</span> <span class="nb">result</span> <span class="ss">(</span><span class="nv">string</span><span class="ss">)</span>

 <span class="nv">character</span><span class="ss">(</span><span class="nv">len</span><span class="o">=*</span><span class="ss">)</span>,<span class="nv">intent</span><span class="ss">(</span><span class="nv">in</span><span class="ss">)</span>          :: <span class="nv">str</span><span class="ss">(</span>:<span class="ss">)</span>
 <span class="nv">character</span><span class="ss">(</span><span class="nv">len</span><span class="o">=*</span><span class="ss">)</span>,<span class="nv">intent</span><span class="ss">(</span><span class="nv">in</span><span class="ss">)</span>,<span class="nv">optional</span> :: <span class="nv">sep</span>
 <span class="nv">logical</span>,<span class="nv">intent</span><span class="ss">(</span><span class="nv">in</span><span class="ss">)</span>,<span class="nv">optional</span>          :: <span class="nv">trm</span>
 <span class="nv">character</span><span class="ss">(</span><span class="nv">len</span><span class="o">=*</span><span class="ss">)</span>,<span class="nv">intent</span><span class="ss">(</span><span class="nv">in</span><span class="ss">)</span>,<span class="nv">optional</span> :: <span class="nv">right</span>
 <span class="nv">character</span><span class="ss">(</span><span class="nv">len</span><span class="o">=*</span><span class="ss">)</span>,<span class="nv">intent</span><span class="ss">(</span><span class="nv">in</span><span class="ss">)</span>,<span class="nv">optional</span> :: <span class="nv">left</span>
 <span class="nv">character</span><span class="ss">(</span><span class="nv">len</span><span class="o">=*</span><span class="ss">)</span>,<span class="nv">intent</span><span class="ss">(</span><span class="nv">in</span><span class="ss">)</span>,<span class="nv">optional</span> :: <span class="nv">start</span>
 <span class="nv">character</span><span class="ss">(</span><span class="nv">len</span><span class="o">=*</span><span class="ss">)</span>,<span class="nv">intent</span><span class="ss">(</span><span class="nv">in</span><span class="ss">)</span>,<span class="nv">optional</span> :: <span class="k">end</span>
 <span class="nv">character</span><span class="ss">(</span><span class="nv">len</span><span class="o">=</span>:<span class="ss">)</span>,<span class="nv">allocatable</span>         :: <span class="nv">string</span>
</code></pre></div>

<h2 id="description">DESCRIPTION</h2>
<p>JOIN(3f) appends the elements of a CHARACTER array into a single
   CHARACTER variable, with elements 1 to N joined from left to right.
   By default each element is trimmed of trailing spaces and the
   default separator is a null string.</p>
<h2 id="options">OPTIONS</h2>
<div class="codehilite"><pre><span></span><code>  <span class="n">STR</span><span class="p">(:)</span>  <span class="n">array</span> <span class="n">of</span> <span class="n">CHARACTER</span> <span class="n">variables</span> <span class="n">to</span> <span class="n">be</span> <span class="n">joined</span>
  <span class="n">SEP</span>     <span class="n">separator</span> <span class="n">string</span> <span class="n">to</span> <span class="n">place</span> <span class="n">between</span> <span class="n">each</span> <span class="n">variable</span><span class="o">.</span> <span class="n">defaults</span>
          <span class="n">to</span> <span class="n">a</span> <span class="nb nb-Type">null</span> <span class="n">string</span><span class="o">.</span>
  <span class="n">LEFT</span>    <span class="n">string</span> <span class="n">to</span> <span class="n">place</span> <span class="n">at</span> <span class="n">left</span> <span class="n">of</span> <span class="n">each</span> <span class="n">element</span>
  <span class="n">RIGHT</span>   <span class="n">string</span> <span class="n">to</span> <span class="n">place</span> <span class="n">at</span> <span class="n">right</span> <span class="n">of</span> <span class="n">each</span> <span class="n">element</span>
  <span class="n">START</span>   <span class="n">prefix</span> <span class="n">string</span>
  <span class="n">END</span>     <span class="n">suffix</span> <span class="n">string</span>
  <span class="n">TRM</span>     <span class="n">option</span> <span class="n">to</span> <span class="n">trim</span> <span class="n">each</span> <span class="n">element</span> <span class="n">of</span> <span class="n">STR</span> <span class="n">of</span> <span class="n">trailing</span>
          <span class="n">spaces</span><span class="o">.</span> <span class="n">Defaults</span> <span class="n">to</span> <span class="o">.</span><span class="n">TRUE</span><span class="o">.</span>
</code></pre></div>

<h2 id="result">RESULT</h2>
<div class="codehilite"><pre><span></span><code>  <span class="n">STRING</span>  <span class="n">CHARACTER</span> <span class="n">variable</span> <span class="n">composed</span> <span class="n">of</span> <span class="n">all</span> <span class="n">of</span> <span class="n">the</span> <span class="n">elements</span> <span class="n">of</span> <span class="n">STR</span><span class="p">()</span>
          <span class="n">appended</span> <span class="n">together</span> <span class="n">with</span> <span class="n">the</span> <span class="n">optional</span> <span class="n">separator</span> <span class="n">SEP</span> <span class="n">placed</span>
          <span class="n">between</span> <span class="n">the</span> <span class="n">elements</span><span class="o">.</span>
</code></pre></div>

<h2 id="example">EXAMPLE</h2>
<p>Sample program:</p>
<p>program demo_join
   use M_strings, only: join
   implicit none
   character(len=:),allocatable  :: s(:)
   character(len=:),allocatable  :: out
   integer                       :: i
     s=[character(len=10) :: &lsquo;United&rsquo;,&rsquo; we&rsquo;,&rsquo; stand,&rsquo;, &amp;
     &amp; &lsquo; divided&rsquo;,&rsquo; we fall.&rsquo;]
     out=join(s)
     write(<em>,&rsquo;(a)&rsquo;) out
     write(</em>,&rsquo;(a)&rsquo;) join(s,trm=.false.)
     write(<em>,&rsquo;(a)&rsquo;) (join(s,trm=.false.,sep=&rsquo;|&rsquo;),i=1,3)
     write(</em>,&rsquo;(a)&rsquo;) join(s,sep=&rsquo;&lt;&gt;&rsquo;)
     write(<em>,&rsquo;(a)&rsquo;) join(s,sep=&rsquo;;&rsquo;,left=&rsquo;[&lsquo;,right=&rsquo;]&rsquo;)
     write(</em>,&rsquo;(a)&rsquo;) join(s,left=&rsquo;[&lsquo;,right=&rsquo;]&rsquo;)
     write(*,&rsquo;(a)&rsquo;) join(s,left=&rsquo;&gt;&gt;&rsquo;)
   end program demo_join</p>
<p>Expected output:</p>
<p>United we stand, divided we fall.
   United     we        stand,    divided   we fall.
   United    | we       | stand,   | divided  | we fall.
   United    | we       | stand,   | divided  | we fall.
   United    | we       | stand,   | divided  | we fall.
   United&lt;&gt; we&lt;&gt; stand,&lt;&gt; divided&lt;&gt; we fall.
   [United];[ we];[ stand,];[ divided];[ we fall.]
   [United][ we][ stand,][ divided][ we fall.]</p>
<blockquote>
<blockquote>
<p>United&gt;&gt; we&gt;&gt; stand,&gt;&gt; divided&gt;&gt; we fall.</p>
</blockquote>
</blockquote>
<h2 id="author">AUTHOR</h2>
<div class="codehilite"><pre><span></span><code>John S. Urban
</code></pre></div>

<h2 id="license">LICENSE</h2>
<div class="codehilite"><pre><span></span><code>Public Domain
</code></pre></div>
    

    <h3>Arguments</h3>
    
      
<table class="table table-striped varlist">
<thead><tr><th>Type</th>
<th>Intent</th><th>Optional</th>
<th>Attributes</th><th></th><th>Name</th><th></th></thead>



<tbody>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-str~4"></span>character(len=*),</td>
  <td>intent(in)</td>
  <td></td>
  
  <td></td><td>::</td>
  <td><strong>str</strong>(:)</td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-sep"></span>character(len=*),</td>
  <td>intent(in),</td>
  <td>optional</td>
  
  <td></td><td>::</td>
  <td><strong>sep</strong></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-trm"></span>logical,</td>
  <td>intent(in),</td>
  <td>optional</td>
  
  <td></td><td>::</td>
  <td><strong>trm</strong></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-left"></span>character(len=*),</td>
  <td>intent(in),</td>
  <td>optional</td>
  
  <td></td><td>::</td>
  <td><strong>left</strong></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-right"></span>character(len=*),</td>
  <td>intent(in),</td>
  <td>optional</td>
  
  <td></td><td>::</td>
  <td><strong>right</strong></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-start"></span>character(len=*),</td>
  <td>intent(in),</td>
  <td>optional</td>
  
  <td></td><td>::</td>
  <td><strong>start</strong></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-end"></span>character(len=*),</td>
  <td>intent(in),</td>
  <td>optional</td>
  
  <td></td><td>::</td>
  <td><strong>end</strong></td><td></td>
  
</tr>

</tbody>
</table>

    
    
    
    
    
    
    
   <h3>Return Value <small><span class="anchor" id="variable-string~5"></span>character(len=:),
  allocatable</small></h3>
    
    
    
    
     
    <br>

    <section class="visible-xs visible-sm hidden-md">
      
<h3>Contents</h3>
 



<div class="panel panel-primary">
  <div class="panel-heading text-left"><h3 class="panel-title"><a data-toggle="collapse" href="#vars-1">Variables</a></h3></div>
  <div id="vars-1" class="panel-collapse collapse">
    <div class="list-group">
      
      <a class="list-group-item" href="../proc/join.html#variable-i~11">i</a>
      
      <a class="list-group-item" href="../proc/join.html#variable-left_local">left_local</a>
      
      <a class="list-group-item" href="../proc/join.html#variable-right_local">right_local</a>
      
      <a class="list-group-item" href="../proc/join.html#variable-sep_local">sep_local</a>
      
      <a class="list-group-item" href="../proc/join.html#variable-trm_local">trm_local</a>
      
    </div>
  </div>
</div>




















<div class="panel panel-primary">
  <div class="panel-heading text-left"><h3 class="panel-title">Source Code</h3></div>
  <div class="list-group">
    <a class="list-group-item" href="../proc/join.html#src">join</a>
  </div>
</div>



    </section>
    <br class="visible-xs visible-sm hidden-md">

    

    
    <section>    
      <h2>Variables</h2>
    
<table class="table table-striped varlist">
<thead><tr><th>Type</th><th>Visibility</th>

<th>Attributes</th><th></th><th>Name</th><th></th><th>Initial</th><th></th></thead>



<tbody>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-i~11"></span>integer,</td>
  
  <td>public</td>
  <td></td><td>::</td>
  <td><strong>i</strong></td><td></td><td></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-left_local"></span>character(len=:),</td>
  
  <td>public,</td>
  <td>allocatable</td><td>::</td>
  <td><strong>left_local</strong></td><td></td><td></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-right_local"></span>character(len=:),</td>
  
  <td>public,</td>
  <td>allocatable</td><td>::</td>
  <td><strong>right_local</strong></td><td></td><td></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-sep_local"></span>character(len=:),</td>
  
  <td>public,</td>
  <td>allocatable</td><td>::</td>
  <td><strong>sep_local</strong></td><td></td><td></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-trm_local"></span>logical,</td>
  
  <td>public</td>
  <td></td><td>::</td>
  <td><strong>trm_local</strong></td><td></td><td></td><td></td>
  
</tr>

</tbody>
</table>

    </section>
    <br>
    
    
    
    
    

    
    
    
    
    


    
    
    
    <section>
    <h2><span class="anchor" id="src"></span>Source Code</h2>
    <div class="highlight"><pre><span></span><span class="k">pure function </span><span class="n">join</span><span class="p">(</span><span class="n">str</span><span class="p">,</span><span class="n">sep</span><span class="p">,</span><span class="n">trm</span><span class="p">,</span><span class="n">left</span><span class="p">,</span><span class="n">right</span><span class="p">,</span><span class="n">start</span><span class="p">,</span><span class="k">end</span><span class="p">)</span> <span class="k">result</span> <span class="p">(</span><span class="n">string</span><span class="p">)</span>

<span class="c">! ident_19=&quot;@(#)M_strings::join(3f): merge string array into a single CHARACTER value adding specified separators, caps, prefix and suffix&quot;</span>

<span class="kt">character</span><span class="p">(</span><span class="nb">len</span><span class="o">=*</span><span class="p">),</span><span class="k">intent</span><span class="p">(</span><span class="n">in</span><span class="p">)</span>          <span class="kd">::</span> <span class="n">str</span><span class="p">(:)</span>
<span class="kt">character</span><span class="p">(</span><span class="nb">len</span><span class="o">=*</span><span class="p">),</span><span class="k">intent</span><span class="p">(</span><span class="n">in</span><span class="p">),</span><span class="k">optional</span> <span class="kd">::</span> <span class="n">sep</span><span class="p">,</span> <span class="n">right</span><span class="p">,</span> <span class="n">left</span><span class="p">,</span> <span class="n">start</span><span class="p">,</span> <span class="k">end</span>
<span class="kt">logical</span><span class="p">,</span><span class="k">intent</span><span class="p">(</span><span class="n">in</span><span class="p">),</span><span class="k">optional</span>          <span class="kd">::</span> <span class="n">trm</span>
<span class="kt">character</span><span class="p">(</span><span class="nb">len</span><span class="o">=</span><span class="p">:),</span><span class="k">allocatable</span>         <span class="kd">::</span> <span class="n">sep_local</span><span class="p">,</span> <span class="n">left_local</span><span class="p">,</span> <span class="n">right_local</span>
<span class="kt">character</span><span class="p">(</span><span class="nb">len</span><span class="o">=</span><span class="p">:),</span><span class="k">allocatable</span>         <span class="kd">::</span> <span class="n">string</span>
<span class="kt">logical</span>                              <span class="kd">::</span> <span class="n">trm_local</span>
<span class="kt">integer</span>                              <span class="kd">::</span> <span class="n">i</span>
   <span class="k">if</span><span class="p">(</span><span class="nb">present</span><span class="p">(</span><span class="n">sep</span><span class="p">))</span><span class="k">then</span>   <span class="p">;</span> <span class="n">sep_local</span><span class="o">=</span><span class="n">sep</span>     <span class="p">;</span> <span class="k">else</span> <span class="p">;</span> <span class="n">sep_local</span><span class="o">=</span><span class="s1">&#39;&#39;</span>     <span class="p">;</span> <span class="k">endif</span>
<span class="k">   if</span><span class="p">(</span><span class="nb">present</span><span class="p">(</span><span class="n">trm</span><span class="p">))</span><span class="k">then</span>   <span class="p">;</span> <span class="n">trm_local</span><span class="o">=</span><span class="n">trm</span>     <span class="p">;</span> <span class="k">else</span> <span class="p">;</span> <span class="n">trm_local</span><span class="o">=</span><span class="p">.</span><span class="n">true</span><span class="p">.</span> <span class="p">;</span> <span class="k">endif</span>
<span class="k">   if</span><span class="p">(</span><span class="nb">present</span><span class="p">(</span><span class="n">left</span><span class="p">))</span><span class="k">then</span>  <span class="p">;</span> <span class="n">left_local</span><span class="o">=</span><span class="n">left</span>   <span class="p">;</span> <span class="k">else</span> <span class="p">;</span> <span class="n">left_local</span><span class="o">=</span><span class="s1">&#39;&#39;</span>    <span class="p">;</span> <span class="k">endif</span>
<span class="k">   if</span><span class="p">(</span><span class="nb">present</span><span class="p">(</span><span class="n">right</span><span class="p">))</span><span class="k">then</span> <span class="p">;</span> <span class="n">right_local</span><span class="o">=</span><span class="n">right</span> <span class="p">;</span> <span class="k">else</span> <span class="p">;</span> <span class="n">right_local</span><span class="o">=</span><span class="s1">&#39;&#39;</span>   <span class="p">;</span> <span class="k">endif</span>
<span class="k">   </span><span class="n">string</span><span class="o">=</span><span class="s1">&#39;&#39;</span>
   <span class="k">if</span><span class="p">(</span><span class="n">size</span><span class="p">(</span><span class="n">str</span><span class="p">).</span><span class="n">eq</span><span class="p">.</span><span class="mi">0</span><span class="p">)</span><span class="k">then</span>
<span class="k">      </span><span class="n">string</span><span class="o">=</span><span class="n">string</span><span class="o">//</span><span class="n">left_local</span><span class="o">//</span><span class="n">right_local</span>
   <span class="k">else</span>
<span class="k">      do </span><span class="n">i</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span><span class="n">size</span><span class="p">(</span><span class="n">str</span><span class="p">)</span><span class="o">-</span><span class="mi">1</span>
         <span class="k">if</span><span class="p">(</span><span class="n">trm_local</span><span class="p">)</span><span class="k">then</span>
<span class="k">            </span><span class="n">string</span><span class="o">=</span><span class="n">string</span><span class="o">//</span><span class="n">left_local</span><span class="o">//</span><span class="nb">trim</span><span class="p">(</span><span class="n">str</span><span class="p">(</span><span class="n">i</span><span class="p">))</span><span class="o">//</span><span class="n">right_local</span><span class="o">//</span><span class="n">sep_local</span>
         <span class="k">else</span>
<span class="k">            </span><span class="n">string</span><span class="o">=</span><span class="n">string</span><span class="o">//</span><span class="n">left_local</span><span class="o">//</span><span class="n">str</span><span class="p">(</span><span class="n">i</span><span class="p">)</span><span class="o">//</span><span class="n">right_local</span><span class="o">//</span><span class="n">sep_local</span>
         <span class="k">endif</span>
<span class="k">      enddo</span>
<span class="k">      if</span><span class="p">(</span><span class="n">trm_local</span><span class="p">)</span><span class="k">then</span>
<span class="k">         </span><span class="n">string</span><span class="o">=</span><span class="n">string</span><span class="o">//</span><span class="n">left_local</span><span class="o">//</span><span class="nb">trim</span><span class="p">(</span><span class="n">str</span><span class="p">(</span><span class="n">i</span><span class="p">))</span><span class="o">//</span><span class="n">right_local</span>
      <span class="k">else</span>
<span class="k">         </span><span class="n">string</span><span class="o">=</span><span class="n">string</span><span class="o">//</span><span class="n">left_local</span><span class="o">//</span><span class="n">str</span><span class="p">(</span><span class="n">i</span><span class="p">)</span><span class="o">//</span><span class="n">right_local</span>
      <span class="k">endif</span>
<span class="k">   endif</span>
<span class="k">   if</span><span class="p">(</span><span class="nb">present</span><span class="p">(</span><span class="n">start</span><span class="p">))</span><span class="n">string</span><span class="o">=</span><span class="n">start</span><span class="o">//</span><span class="n">string</span>
   <span class="k">if</span><span class="p">(</span><span class="nb">present</span><span class="p">(</span><span class="k">end</span><span class="p">))</span><span class="n">string</span><span class="o">=</span><span class="n">string</span><span class="o">//</span><span class="k">end</span>
<span class="k">end function </span><span class="n">join</span>
</pre></div>

    </section>
    <br>
    
    
    </div>
  </div>


    <hr>    
    </div> <!-- /container -->
    <footer>
      <div class="container">
      <div class="row">
        <div class="col-xs-6 col-md-4"><p>&copy; 2022 
                                          </p></div>
        <div class="col-xs-6 col-md-4 col-md-push-4">
          <p class="text-right">
            Documentation generated by 
            <a href="https://github.com/cmacmackin/ford">FORD</a>
             on 2022-01-16 22:32  
          </p>
        </div>
        <div class="col-xs-12 col-md-4 col-md-pull-4"><p class="text-center"> M_strings was developed by John S. Urban</p></div>
      </div>
      <br>
      </div> <!-- /container -->    
    </footer>

    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
<!--
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
-->
    <script src="../js/bootstrap.min.js"></script>
    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <script src="../js/ie10-viewport-bug-workaround.js"></script>

    <!-- MathJax JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        TeX: { extensions: ['AMSmath.js','AMSsymbols.js','noErrors.js','noUndefined.js'], equationNumbers: { autoNumber: 'AMS' } },
        jax: ['input/TeX','input/MathML','output/HTML-CSS'],
        extensions: ['tex2jax.js','mml2jax.js','MathMenu.js','MathZoom.js']
      });
    </script>
    
    <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
    
    
    <script src="../tipuesearch/tipuesearch_content.js"></script>
    <script src="../tipuesearch/tipuesearch_set.js"></script>
    <script src="../tipuesearch/tipuesearch.js"></script>
    
    
  </body>
</html>